Ext.ns('StaffServer.common.base.login');
StaffServer.common.base.login.logout = function(params) {
	Ext.MessageBox.confirm('注销', '确认注销？', function(btn) {
		if (btn == 'yes') {
	
			var defualtParams = {
				before : function() {
				},
				successCallback : function() {
					window.location.reload();
				},
				errorCallback : function(rep) {
					errorHandle(rep);
				}
			};
			Ext.apply(defualtParams, params);
		
			Ext.Ajax.request({
				url : '/j_spring_security_logout',
				disableCaching:true,
				async:false,
				scriptTag:true,
				headers:{'accept':'application/json'},
				params:{
					resourceType:'js'},
				success:function(rep)
				{
					window.location.reload();
				},
				failure:function(rep)
				{
					//_unknowExceptionHandle(rep);
				}
			});
		}
	})
};